package patrol.mobile.com.mobilepatrol.adapter;

import android.content.Context;
import android.view.MotionEvent;
import android.view.View;
import android.widget.SeekBar;

import com.dl7.recycler.adapter.BaseQuickAdapter;
import com.dl7.recycler.adapter.BaseViewHolder;

import patrol.mobile.com.mobilepatrol.R;
import patrol.mobile.com.mobilepatrol.bean.OtherBusinessBean;

/**
 * Created by K on 2018/9/10.
 * des:其他业务
 */
public class OtherBusinessAdapter extends BaseQuickAdapter<OtherBusinessBean> {
    public OtherBusinessAdapter(Context context) {
        super(context);
    }

    @Override
    protected int attachLayoutRes() {
        return R.layout.item_other_business;
    }

    @Override
    protected void convert(BaseViewHolder holder, OtherBusinessBean item) {
        holder.setText(R.id.tv_num, (holder.getAdapterPosition() + 1) + "");
        holder.setText(R.id.tv_title, item.getTitle());
        holder.setText(R.id.tv_time, item.getTerm());
        holder.setText(R.id.tv_situation, item.getSituation());
        holder.setText(R.id.tv_fuze, item.getTerm());
        holder.setText(R.id.tv_urgent, item.getUrgent());
        holder.setText(R.id.tv_lingdao, "");// TODO: 2019/2/13 执行人属性值 
        SeekBar seekBar = holder.getView(R.id.seekBar);
        seekBar.setOnTouchListener(new View.OnTouchListener() {
            @Override
            public boolean onTouch(View view, MotionEvent motionEvent) {
                return true;
            }
        });
    }
}
